package com.sfddata.musicpillow.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sfddata.musicpillow.user.entity.UserClock;
import com.sfddata.musicpillow.user.service.UserClockService;
import com.sfddata.musicpillow.user.mapper.UserClockMapper;
import org.springframework.stereotype.Service;

/**
* @author jiangyingou
* @description 针对表【user_clock】的数据库操作Service实现
* @createDate 2023-06-26 08:19:12
*/
@Service
public class UserClockServiceImpl extends ServiceImpl<UserClockMapper, UserClock>
    implements UserClockService{

    @Override
    public UserClock saveClock(UserClock clockInfo) {

        QueryWrapper<UserClock> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id", clockInfo.getUserId());
        baseMapper.update(clockInfo, queryWrapper);
        return clockInfo;
    }
}




